package com.rizzo.back.dao;

import org.apache.lucene.search.Query;
import org.hibernate.search.FullTextSession;

import java.io.Serializable;
import java.util.List;

/**
 * TODO Insert JavaDoc!
 */
public interface SearchableDao<T, PK extends Serializable> {

    /**
     * TODO Method getSearchSession returns the searchSession of this GenericDao object.
     *
     * @return the searchSession (type FullTextSession) of this GenericDao object.
     */
    public FullTextSession getSearchSession();

    /**
     * TODO Method searchEntity ...
     *
     * @param luceneQuery of type Query
     * @return List<T>
     */
    public List<T> searchEntity(Query luceneQuery);

    /**
     * TODO Method indexAllEntities ...
     */
    public void indexAllEntities();
    
}
